let _xhePrint;

$(function () {
    init();
});

var init = function () {

    try {
        _xhePrint = new xhePrint();
        _xhePrint.control = "printArea";
        _xhePrint.option = {
            text: '20',
            top: '150px',
            left: '150px',
            fontSize: '24px',
            fontFamily: ''
        };
        _xhePrint.options.push(_xhePrint.option);

        _xhePrint.option = {
            text: '取款业务',
            top: '180px',
            left: '195px',
            fontSize: '24px',
            fontFamily: ''
        };
        _xhePrint.options.push(_xhePrint.option);

        _xhePrint.option = {
            text: '2号窗口',
            top: '210px',
            left: '130px',
            fontSize: '24px',
            fontFamily: ''
        };
        _xhePrint.options.push(_xhePrint.option);

        _xhePrint.option = {
            text: '32人',
            top: '240px',
            left: '130px',
            fontSize: '24px',
            fontFamily: ''
        };
        _xhePrint.options.push(_xhePrint.option);

        _xhePrint.option = {
            text: '2022-05-18 16:16:32',
            top: '270px',
            left: '130px',
            fontSize: '24px',
            fontFamily: ''
        };
        _xhePrint.options.push(_xhePrint.option);

     
        _xhePrint.load();
    }
    catch (e) {
        alert(e);
    }
};

function printArea() {

    try {

        _xhePrint.print();
    }
    catch (e) {
        alert(e);
    }
}